<h2>Listing comments</h2>

<table>
  <tr>
    <th>User</th>
    <th>Name</th>
    <th>Site</th>
    <th>Content</th>
    <th>Ip</th>
    <th>Post</th>
    <th>Created at</th>
  </tr>

<% for comment in @comments %>
  <tr>
    <td><%=h comment.user_id %></td>
    <td><%=h comment.name %></td>
    <td><%=h comment.site %></td>
    <td><%=h comment.content %></td>
    <td><%=h comment.ip %></td>
    <td><%=h comment.post_id %></td>
    <td><%=h comment.created_at %></td>
    <td><%= link_to 'Show', comment %></td>
    <td><%= link_to 'Edit', edit_comment_path(comment) %></td>
    <td><%= link_to 'Destroy', comment, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New comment', new_comment_path %>
